﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace LiteQueryWPF.Entities
{
    public class Field
    {
        [XmlAttribute("index")]
        public int Index { get; set; } = 0;

        [XmlIgnore]
        public bool Invalid { get; set; } = true;

        [XmlAttribute("caption")]
        public string Caption { get; set; } = "标签";

        [XmlAttribute("type")]
        public string Type { get; set; } = "normal"; // normal|compare|date

        [XmlAttribute("valuetype")]
        public string ValueType { get; set; } = "string";// text|num|date

        [XmlAttribute("name")]
        public string Name { get; set; } = "fieldName";

        [XmlAttribute("table")]
        public string TableName { get; set; } = "tableName";

        [XmlAttribute("value")]
        public string Value { get; set; } = string.Empty;

        [XmlIgnore]
        public string Operator { get; set; } = "=";
    }
}
